{
GtkAdjustment *hadj;
GtkAdjustment *vadj;
- GtkAllocation allocation;
gint x, y;
hadj = g_object_get_qdata (G_OBJECT (container), hadjustment_key_id);
if (hadj || vadj)
{
GtkWidget *child = focus_child;
+ graphene_rect_t child_bounds;
while (gtk_widget_get_focus_child (child))
child = gtk_widget_get_focus_child (child);
0, 0, &x, &y))
return;
- gtk_widget_get_outer_allocation (child, &allocation);
+ gtk_widget_compute_bounds (child, child, &child_bounds);
if (vadj)
- gtk_adjustment_clamp_page (vadj, y, y + allocation.height);
+ gtk_adjustment_clamp_page (vadj, y, y + child_bounds.size.height);
if (hadj)
- gtk_adjustment_clamp_page (hadj, x, x + allocation.width);
+ gtk_adjustment_clamp_page (hadj, x, x + child_bounds.size.width);
}
}
}
for (i = 0; i < MAX_ICONS; i++)
{
- GtkAllocation icon_alloc;
if (priv->icons[i])
{
- gtk_widget_get_outer_allocation (priv->icons[i]->widget, &icon_alloc);
-
- if (gdk_rectangle_contains_point (&icon_alloc, (int)x, (int)y))
+ int icon_x, icon_y;
+ gtk_widget_translate_coordinates (widget, priv->icons[i]->widget,
+ x, y, &icon_x, &icon_y);
+ if (gtk_widget_contains (priv->icons[i]->widget, icon_x, icon_y))
{
icon_info = priv->icons[i];
break;
/**
* gtk_entry_get_icon_at_pos:
* @entry: a #GtkEntry
- * @x: the x coordinate of the position to find
- * @y: the y coordinate of the position to find
+ * @x: the x coordinate of the position to find, relative to @entry
+ * @y: the y coordinate of the position to find, relative to @entry
*
* Finds the icon at the given position and return its index. The
* position’s coordinates are relative to the @entry’s top left corner.
for (i = 0; i < MAX_ICONS; i++)
{
EntryIconInfo *icon_info = priv->icons[i];
- GtkAllocation allocation;
+ int icon_x, icon_y;
if (icon_info == NULL)
continue;
- gtk_widget_get_outer_allocation (icon_info->widget, &allocation);
- if (gdk_rectangle_contains_point (&allocation, x, y))
+ gtk_widget_translate_coordinates (GTK_WIDGET (entry), icon_info->widget,
+ x, y, &icon_x, &icon_y);
+
+ if (gtk_widget_contains (icon_info->widget, icon_x, icon_y))
return i;
}
* If the entry is not realized or has no icon at the given position,
* @icon_area is filled with zeros. Otherwise, @icon_area will be filled
* with the icon's allocation, relative to @entry's allocation.
- *
- * See also gtk_entry_get_text_area()
*/
void
gtk_entry_get_icon_area (GtkEntry *entry,
if (icon_info)
{
- gtk_widget_get_outer_allocation (icon_info->widget, icon_area);
+ graphene_rect_t r;
+
+ gtk_widget_compute_bounds (icon_info->widget, GTK_WIDGET (entry), &r);
+
+ *icon_area = (GdkRectangle){
+ floorf (r.origin.x),
+ floorf (r.origin.y),
+ ceilf (r.size.width),
+ ceilf (r.size.height),
+ };
}
else
{
GtkListBoxPrivate *priv = BOX_PRIV (box);
GtkWidget *header;
gint y, height;
- GtkAllocation allocation;
+ graphene_rect_t rect;
if (!priv->adjustment)
return;
- gtk_widget_get_outer_allocation (GTK_WIDGET (row), &allocation);
- y = allocation.y;
- height = allocation.height;
+ gtk_widget_compute_bounds (GTK_WIDGET (row), GTK_WIDGET (box), &rect);
+ y = rect.origin.y;
+ height = rect.size.height;
/* If the row has a header, we want to ensure that it is visible as well. */
header = ROW_PRIV (row)->header;
if (GTK_IS_WIDGET (header) && gtk_widget_is_drawable (header))
{
- gtk_widget_get_outer_allocation (header, &allocation);
- y = allocation.y;
- height += allocation.height;
+ gtk_widget_compute_bounds (header, GTK_WIDGET (box), &rect);
+ y = rect.origin.y;
+ height += rect.size.height;
}
gtk_adjustment_clamp_page (priv->adjustment, y, y + height);
}
static gboolean
-definitely_within_item (GtkWidget *widget,
+definitely_within_item (GtkMenu *menu,
+ GtkWidget *widget,
gint x,
gint y)
{
- GtkAllocation allocation;
int w, h;
+ graphene_rect_t bounds;
- gtk_widget_get_outer_allocation (widget, &allocation);
- w = allocation.width;
- h = allocation.height;
+ gtk_widget_compute_bounds (widget, GTK_WIDGET (menu), &bounds);
+ w = bounds.size.width;
+ h = bounds.size.height;
return
check_threshold (widget, 0, 0, x, y) &&
menu_shell = GTK_MENU_SHELL (parent);
menu = GTK_MENU (menu_shell);
- if (definitely_within_item (menu_item, event->x, event->y))
+ if (definitely_within_item (menu, menu_item, event->x, event->y))
menu_shell->priv->activate_time = 0;
/* Check to see if we are within an active submenu's navigation region
if ((tab = get_tab_at_pos (notebook, x, y)) != NULL)
{
- GtkAllocation allocation;
gboolean page_changed, was_focus;
page = tab->data;
/* save press to possibly begin a drag */
if (page->reorderable || page->detachable)
{
+ graphene_rect_t tab_bounds;
+
priv->pressed_button = button;
priv->mouse_x = x;
priv->drag_begin_x = priv->mouse_x;
priv->drag_begin_y = priv->mouse_y;
- gtk_widget_get_outer_allocation (page->tab_widget, &allocation);
+ gtk_widget_compute_bounds (page->tab_widget, GTK_WIDGET (notebook), &tab_bounds);
- priv->drag_offset_x = priv->drag_begin_x - allocation.x;
- priv->drag_offset_y = priv->drag_begin_y - allocation.y;
+ priv->drag_offset_x = priv->drag_begin_x - tab_bounds.origin.x;
+ priv->drag_offset_y = priv->drag_begin_y - tab_bounds.origin.y;
}
}
}
page->tab_label &&
gtk_widget_get_mapped (page->tab_label))
{
- GtkAllocation allocation;
+ graphene_rect_t tab_bounds;
- gtk_widget_get_outer_allocation (page->tab_widget, &allocation);
+ gtk_widget_compute_bounds (page->tab_widget, GTK_WIDGET (notebook), &tab_bounds);
switch (priv->tab_pos)
{
case GTK_POS_BOTTOM:
if (!is_rtl)
{
- if (allocation.x + allocation.width / 2 > x)
+ if (tab_bounds.origin.x + tab_bounds.size.width / 2 > x)
return children;
}
else
{
- if (allocation.x + allocation.width / 2 < x)
+ if (tab_bounds.origin.x + tab_bounds.size.width / 2 < x)
return children;
}
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
- if (allocation.y + allocation.height / 2 > y)
+ if (tab_bounds.origin.y + tab_bounds.size.height / 2 > y)
return children;
break;
}
static void
-get_handle_area (GtkPaned *paned,
- GdkRectangle *area)
+get_handle_area (GtkPaned *paned,
+ graphene_rect_t *area)
{
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
int extra = 0;
- gtk_widget_get_outer_allocation (priv->handle_widget, area);
+ gtk_widget_compute_bounds (priv->handle_widget, GTK_WIDGET (paned), area);
if (!gtk_paned_get_wide_handle (paned))
extra = HANDLE_EXTRA_SIZE;
- area->x -= extra;
- area->y -= extra;
- area->width += extra * 2;
- area->height += extra * 2;
+ graphene_rect_inset (area, - extra, - extra);
}
static void
GtkPaned *paned)
{
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
- GdkRectangle handle_area;
+ graphene_rect_t handle_area;
get_handle_area (paned, &handle_area);
- if (gdk_rectangle_contains_point (&handle_area, x, y) || priv->panning)
+ if (graphene_rect_contains_point (&handle_area, &(graphene_point_t){x, y}) ||
+ priv->panning)
{
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_widget_set_cursor_from_name (GTK_WIDGET (paned), "col-resize");
{
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
GdkEventSequence *sequence;
- GdkRectangle handle_area;
+ graphene_rect_t handle_area;
const GdkEvent *event;
GdkDevice *device;
gboolean is_touch;
return;
}
- if (gdk_rectangle_contains_point (&handle_area, (int)start_x, (int)start_y) ||
+ if (graphene_rect_contains_point (&handle_area, &(graphene_point_t){start_x, start_y}) ||
(is_touch && initiates_touch_drag (paned, start_x, start_y)))
{
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
GtkSnapshot *snapshot)
{
GtkPanedPrivate *priv = gtk_paned_get_instance_private (GTK_PANED (widget));
- GtkAllocation child_allocation;
gtk_snapshot_push_clip (snapshot,
&GRAPHENE_RECT_INIT (
gtk_widget_snapshot_child (widget, priv->handle_widget, snapshot);
if (priv->child1 && gtk_widget_get_visible (priv->child1))
- {
- gtk_widget_get_outer_allocation (priv->child1, &child_allocation);
- gtk_snapshot_push_clip (snapshot,
- &GRAPHENE_RECT_INIT (
- child_allocation.x,
- child_allocation.y,
- child_allocation.width,
- child_allocation.height
- ),
- "GtkPanedChild1");
- gtk_widget_snapshot_child (widget, priv->child1, snapshot);
- gtk_snapshot_pop (snapshot);
- }
+ gtk_widget_snapshot_child (widget, priv->child1, snapshot);
if (priv->child2 && gtk_widget_get_visible (priv->child2))
- {
- gtk_widget_get_outer_allocation (priv->child2, &child_allocation);
- gtk_snapshot_push_clip (snapshot,
- &GRAPHENE_RECT_INIT (
- child_allocation.x,
- child_allocation.y,
- child_allocation.width,
- child_allocation.height
- ),
- "GtkPanedChild2");
- gtk_widget_snapshot_child (widget, priv->child2, snapshot);
- gtk_snapshot_pop (snapshot);
- }
+ gtk_widget_snapshot_child (widget, priv->child2, snapshot);
gtk_snapshot_pop (snapshot);
}
#include "gtkprivate.h"
#include "gtkscale.h"
#include "gtktypebuiltins.h"
-#include "gtkwidgetprivate.h"
#include "gtkwindow.h"
#include "gtkeventcontrollerkey.h"
GdkRectangle *range_rect)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
+ graphene_rect_t r;
g_return_if_fail (GTK_IS_RANGE (range));
g_return_if_fail (range_rect != NULL);
- gtk_widget_get_outer_allocation (priv->trough_widget, range_rect);
+ gtk_widget_compute_bounds (priv->trough_widget, GTK_WIDGET (range), &r);
+
+ *range_rect = (GdkRectangle) {
+ floorf (r.origin.x),
+ floorf (r.origin.y),
+ ceilf (r.size.width),
+ ceilf (r.size.height),
+ };
}
/**
gint *slider_end)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- GtkAllocation slider_alloc;
+ graphene_rect_t slider_bounds;
g_return_if_fail (GTK_IS_RANGE (range));
- gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (priv->slider_widget, GTK_WIDGET (range), &slider_bounds);
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
{
if (slider_start)
- *slider_start = slider_alloc.y;
+ *slider_start = slider_bounds.origin.y;
if (slider_end)
- *slider_end = slider_alloc.y + slider_alloc.height;
+ *slider_end = slider_bounds.origin.y + slider_bounds.size.height;
}
else
{
if (slider_start)
- *slider_start = slider_alloc.x;
+ *slider_start = slider_bounds.origin.y;
if (slider_end)
- *slider_end = slider_alloc.x + slider_alloc.width;
+ *slider_end = slider_bounds.origin.x + slider_bounds.size.width;
}
}
gdouble value;
gint trough_length;
gint slider_length;
- GtkAllocation slider_alloc;
+ graphene_rect_t slider_bounds;
- gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (priv->slider_widget, priv->slider_widget, &slider_bounds);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
trough_length = gtk_widget_get_width (priv->trough_widget);
- slider_length = slider_alloc.width;
+ slider_length = slider_bounds.size.width;
}
else
{
trough_length = gtk_widget_get_height (priv->trough_widget);
- slider_length = slider_alloc.height;
+ slider_length = slider_bounds.size.height;
}
if (trough_length == slider_length)
(keyval == GDK_KEY_Shift_L ||
keyval == GDK_KEY_Shift_R))
{
- GtkAllocation slider_alloc;
+ graphene_rect_t slider_bounds;
- gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (priv->slider_widget, priv->trough_widget, &slider_bounds);
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
- priv->slide_initial_slider_position = slider_alloc.y;
+ priv->slide_initial_slider_position = slider_bounds.origin.y;
else
- priv->slide_initial_slider_position = slider_alloc.x;
+ priv->slide_initial_slider_position = slider_bounds.origin.x;
update_zoom_state (range, !priv->zoom);
return GDK_EVENT_STOP;
gboolean shift_pressed;
guint button;
GdkModifierType state_mask;
- GtkAllocation slider_alloc;
GtkWidget *mouse_location;
+ graphene_rect_t slider_bounds;
if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
source_device = gdk_event_get_source_device ((GdkEvent *) event);
source = gdk_device_get_source (source_device);
- gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (priv->slider_widget, priv->slider_widget, &slider_bounds);
g_object_get (gtk_widget_get_settings (widget),
"gtk-primary-button-warps-slider", &primary_warps,
/* If we aren't fixed, center on the slider. I.e. if this is not a scale... */
if (!priv->slider_size_fixed)
{
- slider_range_x += (slider_alloc.width / 2);
- slider_range_y += (slider_alloc.height / 2);
+ slider_range_x += (slider_bounds.size.width / 2);
+ slider_range_y += (slider_bounds.size.height / 2);
}
update_initial_slider_position (range, slider_range_x, slider_range_y);
if (priv->zoom)
{
- GtkAllocation trough_alloc;
+ graphene_rect_t trough_bounds;
- gtk_widget_get_outer_allocation (priv->trough_widget, &trough_alloc);
+ gtk_widget_compute_bounds (priv->trough_widget, priv->trough_widget, &trough_bounds);
zoom = MIN(1.0, (priv->orientation == GTK_ORIENTATION_VERTICAL ?
- trough_alloc.height : trough_alloc.width) /
+ trough_bounds.size.height : trough_bounds.size.width) /
(gtk_adjustment_get_upper (priv->adjustment) -
gtk_adjustment_get_lower (priv->adjustment) -
gtk_adjustment_get_page_size (priv->adjustment)));
/* recalculate the initial position from the current position */
if (priv->slide_initial_slider_position == -1)
{
- GtkAllocation slider_alloc;
+ graphene_rect_t slider_bounds;
- gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (priv->slider_widget, GTK_WIDGET (range), &slider_bounds);
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
- priv->slide_initial_slider_position = (zoom * (mouse_y - priv->slide_initial_coordinate_delta) - slider_alloc.y) / (zoom - 1.0);
+ priv->slide_initial_slider_position = (zoom * (mouse_y - priv->slide_initial_coordinate_delta) - slider_bounds.origin.y) / (zoom - 1.0);
else
- priv->slide_initial_slider_position = (zoom * (mouse_x - priv->slide_initial_coordinate_delta) - slider_alloc.x) / (zoom - 1.0);
+ priv->slide_initial_slider_position = (zoom * (mouse_x - priv->slide_initial_coordinate_delta) - slider_bounds.origin.x) / (zoom - 1.0);
}
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
#include "gtkstylecontextprivate.h"
#include "gtkstylepropertyprivate.h"
#include "gtktypebuiltins.h"
-#include "gtkwidgetprivate.h"
#include "a11y/gtkscaleaccessible.h"
GtkWidget *widget = GTK_WIDGET (scale);
GtkRange *range = GTK_RANGE (widget);
GtkWidget *slider_widget;
- GtkAllocation slider_alloc, value_alloc;
+ GtkAllocation value_alloc;
int range_width, range_height;
+ graphene_rect_t slider_bounds;
range_width = gtk_widget_get_width (widget);
range_height = gtk_widget_get_height (widget);
slider_widget = gtk_range_get_slider_widget (range);
- gtk_widget_get_outer_allocation (slider_widget, &slider_alloc);
+ gtk_widget_compute_bounds (slider_widget, widget, &slider_bounds);
gtk_widget_measure (priv->value_widget,
GTK_ORIENTATION_HORIZONTAL, -1,
break;
case GTK_POS_TOP:
- value_alloc.x = slider_alloc.x + (slider_alloc.width - value_alloc.width) / 2;
+ value_alloc.x = slider_bounds.origin.x + (slider_bounds.size.width - value_alloc.width) / 2;
value_alloc.y = 0;
break;
case GTK_POS_BOTTOM:
- value_alloc.x = slider_alloc.x + (slider_alloc.width - value_alloc.width) / 2;
+ value_alloc.x = slider_bounds.origin.x + (slider_bounds.size.width - value_alloc.width) / 2;
value_alloc.y = range_height - value_alloc.height;
break;
{
case GTK_POS_LEFT:
value_alloc.x = 0;
- value_alloc.y = (slider_alloc.y + (slider_alloc.height / 2)) - value_alloc.height / 2;
+ value_alloc.y = (slider_bounds.origin.y + (slider_bounds.size.height / 2)) - value_alloc.height / 2;
break;
case GTK_POS_RIGHT:
value_alloc.x = range_width - value_alloc.width;
- value_alloc.y = (slider_alloc.y + (slider_alloc.height / 2)) - value_alloc.height / 2;
+ value_alloc.y = (slider_bounds.origin.y + (slider_bounds.size.height / 2)) - value_alloc.height / 2;
break;
case GTK_POS_TOP:
gint *y)
{
GtkScalePrivate *priv = gtk_scale_get_instance_private (scale);
- GtkAllocation value_alloc;
+ graphene_rect_t value_bounds;
if (!priv->value_widget)
{
return;
}
- gtk_widget_get_outer_allocation (priv->value_widget, &value_alloc);
+ gtk_widget_compute_bounds (priv->value_widget, GTK_WIDGET (scale), &value_bounds);
- *x = value_alloc.x;
- *y = value_alloc.y;
+ *x = value_bounds.origin.x;
+ *y = value_bounds.origin.y;
}
static gchar *
GdkEvent *event)
{
GtkScrolledWindowPrivate *priv;
- GtkAllocation indicator_alloc;
+ graphene_rect_t indicator_bounds;
gdouble x, y;
gint distance;
priv = sw->priv;
- gtk_widget_get_outer_allocation (indicator->scrollbar, &indicator_alloc);
+ gtk_widget_compute_bounds (indicator->scrollbar, GTK_WIDGET (sw), &indicator_bounds);
gdk_event_get_coords (event, &x, &y);
if (indicator->over)
else
distance = INDICATOR_CLOSE_DISTANCE;
+ graphene_rect_inset (&indicator_bounds, distance, distance);
+
if (indicator == &priv->hindicator)
{
- if (y >= indicator_alloc.y - distance &&
- y < indicator_alloc.y + indicator_alloc.height + distance)
+ if (y >= indicator_bounds.origin.y &&
+ y < indicator_bounds.origin.y + indicator_bounds.size.height)
return TRUE;
}
else if (indicator == &priv->vindicator)
{
- if (x >= indicator_alloc.x - distance &&
- x < indicator_alloc.x + indicator_alloc.width + distance)
+ if (x >= indicator_bounds.origin.x &&
+ x < indicator_bounds.origin.x + indicator_bounds.size.width)
return TRUE;
}
#include "gtkorientableprivate.h"
#include "gtkintl.h"
#include "gtkprivate.h"
-#include "gtkwidgetprivate.h"
/**
* SECTION:gtkseparator
g_hash_table_iter_init (&iter, priv->buttons);
while (g_hash_table_iter_next (&iter, NULL, &value))
{
- GdkRectangle allocation;
-
- gtk_widget_get_outer_allocation (GTK_WIDGET (value), &allocation);
- if (gdk_rectangle_contains_point (&allocation, (int)x, (int)y))
+ if (gtk_widget_contains (GTK_WIDGET (value), x, y))
{
button = GTK_WIDGET (value);
retval = TRUE;
GtkSwitch *sw)
{
GtkSwitchPrivate *priv = gtk_switch_get_instance_private (sw);
- GtkAllocation allocation;
+ graphene_rect_t switch_bounds;
- gtk_widget_get_outer_allocation (GTK_WIDGET (sw), &allocation);
+ gtk_widget_compute_bounds (GTK_WIDGET (sw), GTK_WIDGET (sw), &switch_bounds);
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
/* If the press didn't happen in the draggable handle,
* cancel the pan gesture right away
*/
- if ((priv->is_active && x <= allocation.width / 2.0) ||
- (!priv->is_active && x > allocation.width / 2.0))
+ if ((priv->is_active && x <= switch_bounds.size.width / 2.0) ||
+ (!priv->is_active && x > switch_bounds.size.width / 2.0))
gtk_gesture_set_state (priv->pan_gesture, GTK_EVENT_SEQUENCE_DENIED);
}
double y)
{
GtkTreeViewColumnPrivate *priv = column->priv;
- GtkAllocation button_allocation;
+ graphene_rect_t button_bounds;
/* x and y are in treeview coordinates. */
!priv->visible)
return FALSE;
- gtk_widget_get_outer_allocation (priv->button, &button_allocation);
-
- /* No translation needed */
- g_assert (gtk_widget_get_parent (priv->button) == priv->tree_view);
+ gtk_widget_compute_bounds (priv->button, priv->tree_view, &button_bounds);
if (gtk_widget_get_direction (priv->tree_view) == GTK_TEXT_DIR_LTR)
- button_allocation.x += button_allocation.width - TREE_VIEW_DRAG_WIDTH;
+ button_bounds.origin.x += button_bounds.size.width - TREE_VIEW_DRAG_WIDTH;
+
+ button_bounds.size.width = TREE_VIEW_DRAG_WIDTH;
- button_allocation.width = TREE_VIEW_DRAG_WIDTH;
- return gdk_rectangle_contains_point (&button_allocation, (int)x, (int)y);
+ return graphene_rect_contains_point (&button_bounds,
+ &(graphene_point_t){x, y});
}
return GTK_WIDGET_GET_CLASS (widget)->pick (widget, x, y);
}
-void
-gtk_widget_get_outer_allocation (GtkWidget *widget,
- GdkRectangle *allocation)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
- GtkBorder margin;
- GtkCssStyle *style;
-
- style = gtk_css_node_get_style (priv->cssnode);
- get_box_margin (style, &margin);
-
- *allocation = priv->allocation;
-
- allocation->x += margin.left;
- allocation->y += margin.top;
- allocation->width -= margin.left + margin.right;
- allocation->height -= margin.top + margin.bottom;
-}
-
/**
* gtk_widget_compute_bounds:
* @widget: the #GtkWidget to query
gboolean gtk_widget_focus_move (GtkWidget *widget,
GtkDirectionType direction,
GPtrArray *focus_order);
-void gtk_widget_get_outer_allocation (GtkWidget *widget,
- GtkAllocation *allocation);
void gtk_widget_get_surface_allocation (GtkWidget *widget,
GtkAllocation *allocation);